1. Field of the Invention
The present invention relates to a memory device and a controlling method of the memory, and in particular to a memory device a nonvolatile semiconductor memory.
2. Description of the Related Art
Memory devices, such as a memory card, are used as a media for storing music data or video data. They devices use nonvolatile semiconductor memories, such as flash memories. Memory devices typically include a controller for controlling the memory. A file system of a host into which such a memory device is inserted assigns logical addresses to data, and requests the memory device to write this data. The controller instructs the flash memory to store the write data in free memory areas. Moreover, the controller manages relation between logical addresses assigned to data by the file system, and memory areas in the flash memory which store the corresponding data.
Typical examples of the flash memory used for memory devices include a NAND flash memory. In the NAND flash memory, data is written in the unit called a page which consists of more than one bits. The NAND flash memory can erase data only in the unit called a block which consists of more than one pages.
A user may want to know performance of the memory device through the host device. Such performance includes recording speed, time required for record, recordable time, etc. A technique for predicting such performance is described in Jpn. Pat. Appln. KOKAI Publication No. 2006-178923. This technique uses the following principles.
As described above, the NAND flash memory can erase data only in the unit of block. That is, it cannot overwrite data. In order to update data in the memory, a new block needs to be prepared, the data not to be updated needs to be copied in the new block, and the data to be updated needs to be written in the new block. For this reason, data in the flash memory is written fast in continuous free pages, and slowly written in a block including pages storing data and ones without data. That is, data write speed varies according to distribution of written pages in a block (fragmentation). Using this, the write speed of each block is calculated, and recordable time of the memory device is calculated from the number of blocks which satisfy the write speed required by application in a host which will store data in the memory device. However, such a technique using fragmentation requires complicated calculation of performance, and a long time for execution. For this reason, a need arises for the memory device which allows for simpler performance prediction.
Moreover, the increased memory capacity, improved memory device performance, and diversified contents required to be recorded by the user generate a variety of types of usage of memory devices. For example, a request arises for recording two videos such as two TV programs, or recording a picture while recording videos. It is, however, impossible to fulfill the demand to write data for multiple files in parallel into the memory device in real time because the inability of data overwrite requires the above-mentioned data copy, which takes a long time to result in a low speed of writing accompanied by data copy.